<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE>
<base href="<%=basePath%>">
<style>
th,td{ text-align: center;
}
</style>
<html>
  <head>
    <title>新闻类型管理</title>
  </head>
  <body>
  	<h3>新闻类型管理</h3>
  		<table class="table table-bordered table-hover table-condensed table-striped">
  			<thead>
  				<tr>
  					<th>
  					类型编号
  					</th>
  					<th>
  					新闻类型
  					</th>
  					<th>
  					备注
  					</th>
  					<th>
  					操作
  					</th>
  				</tr>
  			</thead>
  			<tbody>
  				<c:forEach var="type" items="${ requestScope.typespage.data}" varStatus="st">
  				<tr>
  					<td>
  					${ type.typeid }
  					</td>
  					<td>
  					${ type.title }
  					</td>
  					<td>
  					${ type.remark}
  					</td>
  					<td>
  					<a href="TypesBiz.do?op=delete&typeid=${ type.typeid }&pageNum=${requestScope.typespage.pageNum}&pageCount=5" class="btn btn-success"> 删除</a>
  					<a href="TypesBiz.do?op=update&typeid=${ type.typeid }" class="btn btn-success"> 修改</a>
  					</td>
  				</tr>
  				</c:forEach>
  			</tbody>
  			<tbody>
  			 	<tr>
  			 		<td  colspan="4" align="right">
  			 			<c:if test="${ requestScope.typespage.pageNum ==1 }">首页</c:if>
  			 			<c:if test="${ requestScope.typespage.pageNum !=1 }">
  			 			<a href="TypesBiz.do?op=admin&pageNum=${ requestScope.typespage.pageNum - 1 }&pageCount=5&typeid=0">上一页 </a>
  			 			</c:if>
  			 			<c:if test="${ requestScope.typespage.pageNum != requestScope.typespage.totalPages }">
  			 			<a href="TypesBiz.do?op=admin&pageNum=${ requestScope.typespage.pageNum + 1 }&pageCount=5&typeid=0">下一页</a>
  			 			</c:if>
  			 			<c:if test="${ requestScope.typespage.pageNum==requestScope.typespage.totalPages }">尾页</c:if>
  			 		</td>
  			 	</tr>
  			</tbody>
  	 </table>
  	  <div align="center">
  		${ requestScope.typeid }
  	</div>
  </body>
</html>
